% 调用的前提，工作区要有sift特征全集 
function [histVector]=getHistVector(featureDownindex,featureUpindex,C,k,siftFeatures)
   histVector=zeros(1,k);
   for i=featureDownindex:featureUpindex
        feature=siftFeatures(i,:);
        % 计算距离
        distance=pdist2(feature,C,'cosine');
        indexs=find(min(distance)==distance);
        if(length(indexs)>1) 
            indexs=indexs; 
        end 
        histVector(indexs)=histVector(indexs)+1;
end